<div class="modal fade" id="error_remarks" tabindex="-1" role="dialog" >
    <div class="modal-dialog" role="document">
        <form class="form-ajax" action="?md=shop&cl=shop&at=remarksExpressOrderError"
              method="post" autocomplete="off">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title" id="exampleModalLabel">请确认订单备注信息</h4>
                </div>
                <div class="modal-body">
                    <input type="hidden" id="error_remarks_id" name="error_remarks_id"/>
                    <div class="form-group">
                        <label for="message-text" class="control-label">骑手备注:</label>
                        <input type="text" name ="remarks_horse" id="remarks_horse" readonly class="form-control " placeholder="" value="" />
                    </div>

                    <div class="form-group">
                        <label for="message-text" class="control-label">门店备注:</label>
                        <input type="text" name ="remarks_error" id="remarks_error" class="form-control " placeholder="" value="" required/>
                    </div>
                    <div class="form-group">
                        <label style="margin-right: 30px;" class="control-label">此备注是否让骑手看到:</label>
                        <label class="radio-inline">
                            <input type="radio" checked value="1" id="radio1" name="radio">是
                        </label>
                        <label class="radio-inline">
                            <input type="radio"  value="2"  id="radio2" name="radio">否
                        </label>
                    </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                    <button type="submit" class="btn btn-primary sub">提交</button>
                    <?php include_once MvcReg::$_moduleName . '/views/layout/woody-prompt.php'; ?>
                </div>
            </div>
        </form>
    </div>
</div>
<script>

    $('.showError').click(function () {
        var errorInfo = $(this).attr('id');
        var expId = $(this).attr('code');
        $("#error_remarks_id").val(expId);
        var info = errorInfo.split('-');
        $("#remarks_horse").val(info[0]);   // 骑手备注
        $("#remarks_error").val(info[1]);   // 门店备注
        if(info[1]){
            $(".sub").hide();
        }else{
            $(".sub").show();
        }

        if(info[2] == 1){
            $("#radio1").prop('checked',true);
            $("#radio2").removeAttr('checked');
        }else if(info[2] == 0 || !info[2]){
            $("#radio2").prop('checked',true);
            $("#radio1").removeAttr('checked');
        }

    })
</script>